/*
 * Copyright (C) 2016-2017 AnStudio
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.astudio.lhasa.workers.translators;

import com.astudio.lhasa.constants.Languages;
import com.astudio.lhasa.interfaces.IInterpreterCallback;

public class Translator {

    public static final int TRANSLATOR_RESULT_SUCCEED = 0;
    public static final int TRANSLATOR_RESULT_FAILED = 1;

    public static final int TRANSLATOR_DIRECTION_CHN_TO_TB = 0;
    public static final int TRANSLATOR_DIRECTION_TB_TO_CHN = 1;

    protected int[] getLanguagesByDirection(int direction) {
        int[] ret = new int[2];

        switch(direction) {
            case TRANSLATOR_DIRECTION_CHN_TO_TB:
                ret[0] = Languages.INTERPRETER_LANGUAGE_CHINESE_MANDARIN;
                ret[1] = Languages.INTERPRETER_LANGUAGE_CHINESE_TIBETAN;
                break;
            case TRANSLATOR_DIRECTION_TB_TO_CHN:
                ret[1] = Languages.INTERPRETER_LANGUAGE_CHINESE_MANDARIN;
                ret[0] = Languages.INTERPRETER_LANGUAGE_CHINESE_TIBETAN;
                break;
        }

        return ret;
    }

    public String requestTranslateLocked(final int direction, final String input) {
        return null;
    }

    public void requestTranslateAsync(final int handler, final int direction, final String input
            , final IInterpreterCallback callback) {
    }
}
